public class test {


    public static void main(String[] args) {
        // 准备数据，假设有10个学生，宿舍容量为4人
        double[][] data = new double[][] {
                {1, 0, 1, 0, 1, 0, 7, 23},
                {0, 1, 0, 1, 0, 1, 6, 22},
                {1, 0, 1, 0, 0, 1, 8, 24},
                {0, 1, 0, 1, 1, 0, 7, 21},
                {1, 0, 1, 0, 1, 0, 6, 22},
                {0, 1, 0, 1, 0, 1, 8, 23},
                {1, 0, 1, 0, 0, 1, 7, 21},
                {0, 1, 0, 1, 1, 0, 6, 24},
                {1, 0, 1, 0, 1, 0, 8, 22},
                {0, 1, 0, 1, 0, 1, 7, 23},
                {1, 0, 1, 0, 1, 0, 7, 23},
                {0, 1, 0, 1, 0, 1, 6, 22},
                {1, 0, 1, 0, 0, 1, 8, 24},
                {0, 1, 0, 1, 1, 0, 7, 21},
                {1, 0, 1, 0, 1, 0, 6, 22},
                {0, 1, 0, 1, 0, 1, 8, 23},
                {1, 0, 1, 0, 0, 1, 7, 21},
                {0, 1, 0, 1, 1, 0, 6, 24},
                {1, 0, 1, 0, 1, 0, 8, 22},
                {0, 1, 0, 1, 0, 1, 7, 23},
                {1, 0, 1, 0, 1, 0, 7, 23},
                {0, 1, 0, 1, 0, 1, 6, 22},
                {1, 0, 1, 0, 0, 1, 8, 24},
                {0, 1, 0, 1, 1, 0, 7, 21},
                {1, 0, 1, 0, 1, 0, 6, 22},
                {0, 1, 0, 1, 0, 1, 8, 23},
                {1, 0, 1, 0, 0, 1, 7, 21},
                {0, 1, 0, 1, 1, 0, 6, 24},
                {1, 0, 1, 0, 1, 0, 8, 22},
                {0, 1, 0, 1, 0, 1, 7, 23}

        };
        KMeans kMeans=new KMeans(5,10000,data,6);

        kMeans.run();

    }
}
